/* picture.h */

#ifndef DODO_PICTURE_H
#define DODO_PICTURE_H

#include <dodo_plot/kernel/plotfwd.h>
#include <dodo_plot/kernel/position.h>
#include <dodo_plot/kernel/operation.h>
//#include <dodo_plot/pic.h>

namespace dodo_plot
{

class Picture
{
	template<class T> friend class Pic;
//	friend class HCat_Pic;
//	friend class VCat_Pic;
	friend class Combi_Pic;
	friend class Frame_Pic;
	friend Picture operator| (const Picture&, const Picture&);
	friend Picture operator& (const Picture&, const Picture&);
	friend Picture operator+ (const Picture&, const Picture&);
	friend Picture combi(const Picture&, const Picture&, double, double);
	friend Picture combi(const Picture&, const Picture&, int mode, double extra_x_offset, double extra_y_offset);
	friend Picture frame(const Picture&, double, double, bool);
public:
	Picture();
	template<class T> Picture(const T& data) :
		p_(new Pic<T>(data)) { };
	Picture(const Picture&);
	~Picture();
	Picture& operator= (const Picture&);
	
	double height() const;
	double width() const;
	Position local_pos() const;
	void draw(const Plotter& plotter) const;
//	std::string& name();
private:
	Picture(P_Node*, int);
	P_Node* p_;

};

}

#endif //DODO_PICTURE_H

